import { defineStore } from "pinia";
import axios from 'axios';

export const useUserStore = defineStore("user",{
    state:()=>({
        menus:[]
    }),
    actions:{
        fetchMenus: async ()=>{
            const res = await axios.get("http://localhost:8080/api/user/menu",{
                headers:{
                    "Authorization":"Bearer "+localStorage.getItem("token")
                }
            })
            console.log(res.data)
        }
    }
})